<?php
	include 'public.php';
	//查询用户数据
	$id = $_SESSION['home']['id'];
	$sql = "select * from ".PRE."user where id='{$id}'";
	$result = mysql_query($sql);
	$userinfo = mysql_fetch_assoc($result);
?>

	<div class="admin_main_nav">个人信息&gt;&gt;更新个人信息</div>
			<div class="userinfo">
					<div class="mt20">
						<table cellspacing="0" cellpadding="0" width="800">
							<form action="action.php?a=update" method="post" enctype="multipart/form-data">
							<input type="hidden" value="<?php echo $userinfo['touxiang']?>" name="touxiang"/>
							<tr>
								<th width="150">用户ID：</th>
								<td><?php echo $userinfo['id']?></td>
								<td rowspan="6" width="200"><input type="file" name="pic"/>上传头像</td>
							</tr>
							<tr>
								<th>用户名：</th>
								<td><?php echo $userinfo['name']?></td>
							</tr>
							<tr>
								<th>性别：</th>
								<td>
								<input type="radio" name="sex" value="0" <?php echo $userinfo['sex'] == 0? checked:''; ?>/>女
								<input type="radio" name="sex" value="1" <?php echo $userinfo['sex'] == 1? checked:''; ?>/>男
								<input type="radio" name="sex" value="2" <?php echo $userinfo['sex'] == 2? checked:''; ?>/>保密
								</td>
							</tr>
							<tr>
								<th>电话：</th>
								<td><input class="in_text" type="text" name="tel" value="<?php echo $userinfo['tel']?>"/></td>
							</tr>
							<tr>
								<th>邮箱：</th>
								<td><input class="in_text" type="text" name="email" value="<?php echo $userinfo['email']?>"/></td>
							</tr>
							<tr>
								<th>地址：</th>
								<td><input class="in_text" type="text" name="address" value="<?php echo $userinfo['address']?>"/></td>
							</tr>
							
							<tr>
								<th>生日：</th>
								<td colspan="2"><input class="in_text" type="text" name="birthday" value="<?php echo $userinfo['birthday']?>"/>　格式（2000-10-31）</td>
							</tr>
							<tr>
								<th>个性签名：</th>
								<td colspan="2"><textarea cols="30" name="sign"><?php echo $userinfo['sign']?></textarea></td>
							</tr>
							<tr>
								<th colspan="3" class="submit"><input type="submit" value="更新个人信息"/></th>
							</tr>
							</form>
						</table>
					</div>
			</div>

<?php include 'public_b.php';?>

